package com.freshcity.component.tooltip
{
	import com.freshcity.lib.tooltip.IToolTip;
	
	import flash.display.DisplayObjectContainer;
	import flash.display.Sprite;

	public class BaseToolTip extends Sprite implements IToolTip
	{
		protected var paddingTop:Number=5;

		protected var paddingBottom:Number=5;

		protected var paddingLeft:Number=5;

		protected var paddingRight:Number=5;

		protected var _width:Number;

		protected var _height:Number;

		protected var contentContainer:DisplayObjectContainer;

		public function BaseToolTip()
		{
			this.contentContainer=new Sprite();
			super();
			return;
		}

		protected function updateSize(arg1:Number, arg2:Number):void
		{
			return;
		}

		public function set data(arg1:*):void
		{
			this._width=this.contentContainer.width + this.paddingLeft + this.paddingRight;
			this._height=this.contentContainer.height + this.paddingTop + this.paddingBottom;
			this.contentContainer.y=this.paddingTop;
			this.contentContainer.x=this.paddingLeft;
			this.updateSize(this._width, this._height);
			return;
		}

	}
}
